/*
//  JTFileData.h
//  Agate Rule Tester
//
//  Created by Jim Turner on 11/20/05.

License: GNU General Public License
This program is free software; you can redistribute it and/or modify it under 
the terms of the GNU General Public License as published by the Free Software 
Foundation; either version 2 of the License, or (at your option) any later 
version.

This program is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 
details.

You should have received a copy of the GNU General Public License along 
with this program; if not, write to the Free Software Foundation, Inc., 
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
http://www.gnu.org/licenses/licenses.html#GPL

*/

#import <Cocoa/Cocoa.h>
#import "JTPerlInterface.h"


@interface JTFileData : NSObject 
{
	NSData   *fileData;
	NSString *fileDataPath;
	NSString *extractedStoryText;
	NSString *extractionError;
	BOOL      showDTMnemonics;
	BOOL      openedAsASCII;

	// These are used to hold temp thingers while the rules process
	NSString *currentAgateString;
	NSMutableArray *beginTextRules, *endTextRules;

	JTPerlInterface *perl;
}

#pragma mark Object Initialization and Destruction
+ (id)initWithPath:(NSString *) path;
- (id)doInit:(NSString *)path;
- (void) dealloc;
- (NSString *)getExtractionError;

#pragma mark Perl-related stuff
- (NSString *)runRules:(NSMutableArray *)rules afterBaseRules:(NSMutableArray *)baseRules;
- (void)processRuleSet:(NSMutableArray *)ruleset ignoreBeginEndCheck:(BOOL)ignoreCheck;

#pragma mark Accessor methods
- (NSString *)originalFileData;
- (BOOL) openedAsASCII;
- (void)toggleDTMnemonics:(BOOL)state;

@end
